import React from 'react';
import Clock from './components/Clock';
import Todo from './components/Todo';
import Duanzi from './components/Duanzi';
import YiYan from './components/YiYan';
import Website from './components/Website';
import LOL from './components/LOL';
import Proxy from './components/Proxy';
import CVideo from './components/CVideo';

//1. 导入 路由组件 Router组件  BrowserRouter  HashRouter
import {Route, BrowserRouter, Link} from 'react-router-dom';

import './App.css';

export default class App extends React.Component {

    render(){
        return <div>
            {/* 2. 设置路由器 */}
            <BrowserRouter>
                {/* 4. 设置 Link 组件 */}
                <Link to="/clock">电子时钟</Link> &nbsp;&nbsp;
                <Link to="/video">视频</Link> &nbsp;&nbsp;
                <Link to="/yiyan">一句话</Link> &nbsp;&nbsp;
                <br />
                {/* 3. 路由规则 */}
                <Route path="/clock"  component={Clock}  />
                <Route path="/video"  component={CVideo}  />
                <Route path="/yiyan"  component={YiYan}  />
            </BrowserRouter>
        </div>
    }
   
}

